<template>
  <div>
    <div class="div">
      <div class="photo" v-for="(v, i) in four" :key="i">
        <img src="../../assets/a6.png" alt />
        <p>{{ v.type }}</p>
      </div>
    </div>
  </div>
</template>

<script>
import { getlink } from "@/api/getlink.js";
export default {
  data() {
    return {
      num: [],
    };
  },
  computed: {
    four() {
      return this.num.slice(0, 4);
    },
  },
  mounted() {
    getlink("/proxy/songType/findAllType").then((ok) => {
      this.num = ok.data.data;
    });
  },
  // props: ["arr1"]
};
</script>

<style scoped>
.photo {
  font-size: 0.2rem;
  width: 1rem;
  height: 1.04rem;
  text-align: center;
  flex-shrink: 0;
}
img {
  width: 0.56rem;
  height: 0.56rem;
  margin: auto;
  margin-bottom: 0.25rem;
}
.div {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
  margin-bottom: 0.77rem;
}
</style>
